/* 长按指示器样式 */
.indicator {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  user-select: none;
  animation: indicatorFadeIn 0.2s ease-out;
}

@keyframes indicatorFadeIn {
  from {
    opacity: 0;
    transform: scale(0.8);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* 圆形进度条 */
.progressRing {
  width: 100px;
  height: 100px;
  position: relative;
}

.progressRingBackground {
  transition: stroke 0.2s ease;
}

.progressRingProgress {
  transition: stroke-dashoffset 0.1s ease-out;
  filter: drop-shadow(0 2px 8px rgba(0, 123, 255, 0.4));
}

/* 中心内容 */
.centerContent {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 50%;
  width: 60px;
  height: 60px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
  backdrop-filter: blur(8px);
  border: 2px solid rgba(0, 123, 255, 0.2);
}

.icon {
  font-size: 20px;
  margin-bottom: 2px;
  animation: iconPulse 1s ease-in-out infinite;
}

@keyframes iconPulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
  }
}

.count {
  font-size: 14px;
  font-weight: 600;
  color: #007bff;
  line-height: 1;
}

.text {
  font-size: 10px;
  font-weight: 500;
  color: #007bff;
  line-height: 1;
  text-align: center;
}

/* 提示文本 */
.tooltip {
  margin-top: 12px;
  padding: 6px 12px;
  background: rgba(0, 0, 0, 0.8);
  color: white;
  border-radius: 16px;
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
  animation: tooltipSlideUp 0.3s ease-out 0.1s both;
}

@keyframes tooltipSlideUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 激活状态的样式 */
.indicator[data-active="true"] .progressRingProgress {
  stroke: #28a745;
  filter: drop-shadow(0 2px 8px rgba(40, 167, 69, 0.4));
}

.indicator[data-active="true"] .centerContent {
  border-color: rgba(40, 167, 69, 0.3);
  background: rgba(40, 167, 69, 0.05);
}

.indicator[data-active="true"] .icon {
  color: #28a745;
  animation: activatedPulse 0.5s ease-in-out infinite;
}

@keyframes activatedPulse {
  0%, 100% {
    transform: scale(1) rotate(0deg);
  }
  50% {
    transform: scale(1.15) rotate(5deg);
  }
}

.indicator[data-active="true"] .text {
  color: #28a745;
}

.indicator[data-active="true"] .tooltip {
  background: rgba(40, 167, 69, 0.9);
}

/* 响应式设计 */
@media (max-width: 768px) {
  .indicator {
    transform: scale(0.8);
  }

  .tooltip {
    font-size: 11px;
    padding: 4px 8px;
  }
}

@media (max-width: 480px) {
  .indicator {
    transform: scale(0.7);
  }

  .progressRing {
    width: 80px;
    height: 80px;
  }

  .centerContent {
    width: 50px;
    height: 50px;
  }

  .icon {
    font-size: 16px;
  }

  .count,
  .text {
    font-size: 10px;
  }
}

/* 高对比度模式支持 */
@media (prefers-contrast: high) {
  .centerContent {
    background: white;
    border-width: 3px;
  }

  .progressRingBackground {
    stroke: rgba(0, 0, 0, 0.5);
    stroke-width: 6;
  }

  .progressRingProgress {
    stroke-width: 6;
  }

  .tooltip {
    background: black;
    border: 1px solid white;
  }
}

/* 减少动画模式支持 */
@media (prefers-reduced-motion: reduce) {
  .indicator,
  .icon,
  .tooltip {
    animation: none;
  }

  .progressRingProgress {
    transition: none;
  }

  .icon {
    transform: none;
  }
}
